﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestGenerator
{
    public static class ArrayShuffle
    {
        static public void Shuffle(List<Question> arr)
        {
            Random rand = new Random();
            for (int i = 0; i < arr.Count; i++)
            {
                int j = rand.Next(arr.Count);

                Question old = arr[i];
                arr[i] = arr[j];
                arr[j] = old;
            }
        }
        static public void ShuffleArray(Question[] arr)
        {
            Random rand = new Random();
            for (int i = 0; i < arr.Length; i++)
            {
                int j = rand.Next(arr.Length);

                Question old = arr[i];
                arr[i] = arr[j];
                arr[j] = old;
            }
        }
    }
}